using System;
using System.Collections.Generic;
using System.Text;
namespace MyDMS.BusinessLayer
{
	public class UserInRole: BusinessObjectBase
	{

		#region InnerClass
		public enum UserInRoleFields
		{
			User_Code,
			Role_Code,
			Is_Active,
			Creation_Date,
			Updation_Date
		}
		#endregion

		#region Data Members

			int _user_Code;
			int _role_Code;
			bool? _is_Active;
			DateTime? _creation_Date;
			DateTime? _updation_Date;

		#endregion

		#region Properties

		public int  User_Code
		{
			 get { return _user_Code; }
			 set
			 {
				 if (_user_Code != value)
				 {
					_user_Code = value;
					 PropertyHasChanged("User_Code");
				 }
			 }
		}

		public int  Role_Code
		{
			 get { return _role_Code; }
			 set
			 {
				 if (_role_Code != value)
				 {
					_role_Code = value;
					 PropertyHasChanged("Role_Code");
				 }
			 }
		}

		public bool?  Is_Active
		{
			 get { return _is_Active; }
			 set
			 {
				 if (_is_Active != value)
				 {
					_is_Active = value;
					 PropertyHasChanged("Is_Active");
				 }
			 }
		}

		public DateTime?  Creation_Date
		{
			 get { return _creation_Date; }
			 set
			 {
				 if (_creation_Date != value)
				 {
					_creation_Date = value;
					 PropertyHasChanged("Creation_Date");
				 }
			 }
		}

		public DateTime?  Updation_Date
		{
			 get { return _updation_Date; }
			 set
			 {
				 if (_updation_Date != value)
				 {
					_updation_Date = value;
					 PropertyHasChanged("Updation_Date");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("User_Code", "User_Code"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Role_Code", "Role_Code"));
		}

		#endregion

	}
}
